
LIBPARAPIN_OBJS := parapin.o

CFLAGS += -O2 -g -Wall $(CONFIG_H)


###########################################################################

default: libparapin.a 


##### libraries

libparapin.a: $(LIBPARAPIN_OBJS)
	ar -cr libparapin.a $(LIBPARAPIN_OBJS)

parapin.o: parapin.c parapin.h parapin-linux.h
	$(CC) $(CFLAGS) -c parapin.c;


# Clean target
clean:
	rm -f *.[oa] *.ko $(EXAMPLE_PROGRAMS)
	make -C $(LINUX_SRC) M=`pwd` clean


#####################################

# Language binding targets, must be invoked explicitly as
# "make parapin_<binding-name>-<target>".  Note that all
# the clean targets are also invoked from the main clean target
# above

parapin_%-build: libparapin.a
	make -C $(subst -build,,$@) build

parapin_%-install: libparapin.a
	make -C $(subst -install,,$@) install

parapin_%-clean:
	make -C $(subst -clean,,$@) clean
